﻿Imports System
Imports System.Workflow.Runtime

Namespace System.Workflow.Activities
    <Serializable> _
    Public Class ExternalDataEventArgs
        Inherits EventArgs
        ' Methods
        Public Sub New(ByVal instanceId As Guid)
            Me.New(instanceId, Nothing, Nothing, False)
        End Sub

        Public Sub New(ByVal instanceId As Guid, ByVal workHandler As IPendingWork, ByVal workItem As Object)
            Me.New(instanceId, workHandler, workItem, False)
        End Sub

        Public Sub New(ByVal instanceId As Guid, ByVal workHandler As IPendingWork, ByVal workItem As Object, ByVal waitForIdle As Boolean)
            Me.instanceId = instanceId
            Me.batchworkHandler = workHandler
            Me.batchworkItem = workItem
            Me.waitForIdle = waitForIdle
        End Sub


        ' Properties
        Public Property Identity As String
            Get
                Return Me.identity
            End Get
            Set(ByVal value As String)
                Me.identity = value
            End Set
        End Property

        Public Property InstanceId As Guid
            Get
                Return Me.instanceId
            End Get
            Set(ByVal value As Guid)
                Me.instanceId = value
            End Set
        End Property

        Public Property WaitForIdle As Boolean
            Get
                Return Me.waitForIdle
            End Get
            Set(ByVal value As Boolean)
                Me.waitForIdle = value
            End Set
        End Property

        Public Property WorkHandler As IPendingWork
            Get
                Return Me.batchworkHandler
            End Get
            Set(ByVal value As IPendingWork)
                Me.batchworkHandler = value
            End Set
        End Property

        Public Property WorkItem As Object
            Get
                Return Me.batchworkItem
            End Get
            Set(ByVal value As Object)
                Me.batchworkItem = value
            End Set
        End Property


        ' Fields
        Private batchworkHandler As IPendingWork
        Private batchworkItem As Object
        Private identity As String
        Private instanceId As Guid
        Private waitForIdle As Boolean
    End Class
End Namespace

